/*
 * SoftwareSAR - 1.0
 */
package br.com.cpqd.ssar.mediador.gui;

import br.com.cpqd.ssar.gerenciador.GerenciamentoArvore;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import java.awt.CardLayout;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.JPanel;
import javax.swing.tree.DefaultTreeModel;
import br.com.cpqd.ssar.utilitarias.FonteEletromagneticaSimulacao;

/**
 * Janela Principal do Aplicativo
 * @author  Rafael Buck
 * @version 1.3
 */
public class JanelaPrincipal extends javax.swing.JFrame {
    /**
     * Controlador de Janelas
     */
    ControladorJanelas controladorJanelas;

    /**
     * Método Construtor
     * @param controladorJanelas ControladorJanelas
     */
    public JanelaPrincipal(ControladorJanelas controladorJanelas) {
        this.controladorJanelas = controladorJanelas;
        initComponents();

        // Seta icone padrao
        Image img = Toolkit.getDefaultToolkit().getImage(controladorJanelas.obterCaminhoIcones());
        this.setIconImage(img);

    }

    /**
     * Seta Tela central com o novo JPanel passado como parâmetro
     * @param newJPanel JPanel
     */
    public void setJPanelCentral(JPanel newJPanel) {
        // Adiciona JPanel ao CardLayout
        jPanel2.add(newJPanel, "card2");
        // Obtem a referência do CardLayout do Painel2 (central)
        CardLayout cl = (CardLayout) (jPanel2.getLayout());
        // Seta como JPanel corrente
        cl.show(jPanel2, "card2");
        // Atualiza janela Principal
        setVisible(true);
    }

    /**
     * Aciona os Botões Acessíveis Após a Abertura ou Criação de um Projeto
     */
    public void acionaBotoesAposAberturaProjeto() {
        jMenuItemSalvarProjeto.setEnabled(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenuArquivo = new javax.swing.JMenu();
        jMenuItemNovoProjeto = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JSeparator();
        jMenuItemAbrirProjeto = new javax.swing.JMenuItem();
        jMenuItemSalvarProjeto = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JSeparator();
        jMenuItemSair = new javax.swing.JMenuItem();
        jMenuEditar = new javax.swing.JMenu();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JSeparator();
        jMenuItemCadastrarMaterial = new javax.swing.JMenuItem();
        jMenuItemEditarMaterial = new javax.swing.JMenuItem();
        jSeparator6 = new javax.swing.JSeparator();
        jMenuItemCriarFonte = new javax.swing.JMenuItem();
        jMenuItemEditarFonte = new javax.swing.JMenuItem();
        jMenuItemRemoverFonte = new javax.swing.JMenuItem();
        jSeparator4 = new javax.swing.JSeparator();
        jMenuItemImportarSTL = new javax.swing.JMenuItem();
        jMenuItemImportarDXF = new javax.swing.JMenuItem();
        jMenuItemImportarSSAR = new javax.swing.JMenuItem();
        jMenuSimulacao = new javax.swing.JMenu();
        jMenuItemImportarMalhaFDTD = new javax.swing.JMenuItem();
        jMenuItemGerarMalhaFDTD = new javax.swing.JMenuItem();
        jSeparator5 = new javax.swing.JSeparator();
        jMenuItemSimularFDTD = new javax.swing.JMenuItem();
        jMenuAjuda = new javax.swing.JMenu();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Software SEM-BR - v1.2");
        setLocationByPlatform(true);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                fecharJanela(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 703, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        jPanel2.setBackground(new java.awt.Color(231, 240, 250));
        jPanel2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(153, 153, 153), 1, true));
        jPanel2.setLayout(new java.awt.CardLayout());

        jMenuArquivo.setText("Arquivo");

        jMenuItemNovoProjeto.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemNovoProjeto.setText("Novo projeto");
        jMenuItemNovoProjeto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemNovoProjetoActionPerformed(evt);
            }
        });
        jMenuArquivo.add(jMenuItemNovoProjeto);
        jMenuArquivo.add(jSeparator1);

        jMenuItemAbrirProjeto.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemAbrirProjeto.setText("Abrir projeto");
        jMenuItemAbrirProjeto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAbrirProjetoActionPerformed(evt);
            }
        });
        jMenuArquivo.add(jMenuItemAbrirProjeto);

        jMenuItemSalvarProjeto.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemSalvarProjeto.setText("Salvar projeto");
        jMenuItemSalvarProjeto.setEnabled(false);
        jMenuItemSalvarProjeto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemSalvarProjetoActionPerformed(evt);
            }
        });
        jMenuArquivo.add(jMenuItemSalvarProjeto);

        jMenuItem6.setText("Salvar projeto como");
        jMenuItem6.setEnabled(false);
        jMenuArquivo.add(jMenuItem6);

        jMenuItem3.setText("Sair projeto");
        jMenuItem3.setEnabled(false);
        jMenuArquivo.add(jMenuItem3);
        jMenuArquivo.add(jSeparator2);

        jMenuItemSair.setText("Sair");
        jMenuItemSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemSairActionPerformed(evt);
            }
        });
        jMenuArquivo.add(jMenuItemSair);

        jMenuBar1.add(jMenuArquivo);

        jMenuEditar.setText("Editar");

        jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem4.setText("Desfazer");
        jMenuItem4.setEnabled(false);
        jMenuEditar.add(jMenuItem4);

        jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem8.setText("Refazer");
        jMenuItem8.setEnabled(false);
        jMenuEditar.add(jMenuItem8);
        jMenuEditar.add(jSeparator3);

        jMenuItemCadastrarMaterial.setText("Registrar novo material");
        jMenuItemCadastrarMaterial.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemCadastrarMaterialActionPerformed(evt);
            }
        });
        jMenuEditar.add(jMenuItemCadastrarMaterial);

        jMenuItemEditarMaterial.setText("Editar lista de materiais");
        jMenuItemEditarMaterial.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemEditarMaterialActionPerformed(evt);
            }
        });
        jMenuEditar.add(jMenuItemEditarMaterial);
        jMenuEditar.add(jSeparator6);

        jMenuItemCriarFonte.setText("Criar fonte eletromagnética");
        jMenuItemCriarFonte.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemCriarFonteActionPerformed(evt);
            }
        });
        jMenuEditar.add(jMenuItemCriarFonte);

        jMenuItemEditarFonte.setText("Editar fonte eletromagnética");
        jMenuItemEditarFonte.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemEditarFonteActionPerformed(evt);
            }
        });
        jMenuEditar.add(jMenuItemEditarFonte);

        jMenuItemRemoverFonte.setText("Remover fonte eletromagnética");
        jMenuItemRemoverFonte.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemRemoverFonteActionPerformed(evt);
            }
        });
        jMenuEditar.add(jMenuItemRemoverFonte);
        jMenuEditar.add(jSeparator4);

        jMenuItemImportarSTL.setText("Importar modelo STL");
        jMenuItemImportarSTL.setEnabled(false);
        jMenuItemImportarSTL.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemImportarSTLActionPerformed(evt);
            }
        });
        jMenuEditar.add(jMenuItemImportarSTL);

        jMenuItemImportarDXF.setText("Importar modelo DXF");
        jMenuItemImportarDXF.setEnabled(false);
        jMenuEditar.add(jMenuItemImportarDXF);

        jMenuItemImportarSSAR.setText("Importar modelo SSAR");
        jMenuItemImportarSSAR.setEnabled(false);
        jMenuEditar.add(jMenuItemImportarSSAR);

        jMenuBar1.add(jMenuEditar);

        jMenuSimulacao.setText("Simulação");

        jMenuItemImportarMalhaFDTD.setText("Importar malha FDTD 3D");
        jMenuItemImportarMalhaFDTD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemImportarMalhaFDTDActionPerformed(evt);
            }
        });
        jMenuSimulacao.add(jMenuItemImportarMalhaFDTD);

        jMenuItemGerarMalhaFDTD.setText("Gerar malha FDTD 3D");
        jMenuItemGerarMalhaFDTD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemGerarMalhaFDTDActionPerformed(evt);
            }
        });
        jMenuSimulacao.add(jMenuItemGerarMalhaFDTD);
        jMenuSimulacao.add(jSeparator5);

        jMenuItemSimularFDTD.setText("Simular FDTD 3D");
        jMenuItemSimularFDTD.setEnabled(false);
        jMenuSimulacao.add(jMenuItemSimularFDTD);

        jMenuBar1.add(jMenuSimulacao);

        jMenuAjuda.setText("Ajuda");

        jMenuItem7.setText("Ajuda");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAjudaActionPerformed(evt);
            }
        });
        jMenuAjuda.add(jMenuItem7);

        jMenuItem1.setText("Sobre");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenuAjuda.add(jMenuItem1);

        jMenuBar1.add(jMenuAjuda);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 707, Short.MAX_VALUE)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 527, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void fecharJanela(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_fecharJanela
    
    int opcao;
        if (controladorJanelas.isProjetoCriado()) {
            int opcao2 = controladorJanelas.obterServicos().exibirMensagemEscolhaSimNao("Deseja Salvar Projeto?");
            if (opcao2 == 0) {
                controladorJanelas.obterServicos().salvarProjeto();
                controladorJanelas.obterServicos().exibirMensagemInformacao("Projeto Salvo com Sucesso");
            } else if (opcao2 == 1) {
            }
        }        
        System.exit(0);
}//GEN-LAST:event_fecharJanela

private void jMenuItemNovoProjetoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemNovoProjetoActionPerformed
// TODO add your handling code here:
    
    controladorJanelas.criarNovoProjeto();

//    if (controladorJanelas.isProjetoCriado()) {
//        int opcao = controladorJanelas.obterServicos().exibirMensagemEscolhaSimNaoCancelar("Deseja Salvar Projeto?");
//        if (opcao == 0) {
//            controladorJanelas.obterServicos().salvarProjeto();
//            controladorJanelas.obterServicos().exibirMensagemInformacao("Projeto Salvo com Sucesso");
//            controladorJanelas.obterServicos().reinicializarSistema();
//            JanelaCriarNovoProjeto janelaNovoProjeto = new JanelaCriarNovoProjeto(controladorJanelas, new Frame(), true);
//            // Centraliza
//            janelaNovoProjeto.setLocationRelativeTo(null);
//            // visivel
//            janelaNovoProjeto.setVisible(true);
//        } else if (opcao == 1) {
//            controladorJanelas.obterServicos().reinicializarSistema();
//            JanelaCriarNovoProjeto janelaNovoProjeto = new JanelaCriarNovoProjeto(controladorJanelas, new Frame(), true);
//            // Centraliza
//            janelaNovoProjeto.setLocationRelativeTo(null);
//            // visivel
//            janelaNovoProjeto.setVisible(true);
//        }
//    } else {
//        JanelaCriarNovoProjeto janelaNovoProjeto = new JanelaCriarNovoProjeto(controladorJanelas, new Frame(), true);
//        // Centraliza
//        janelaNovoProjeto.setLocationRelativeTo(null);
//        // visivel
//        janelaNovoProjeto.setVisible(true);
//    }
}//GEN-LAST:event_jMenuItemNovoProjetoActionPerformed

private void jMenuItemSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSairActionPerformed
// TODO add your handling code here:

    //controladorJanelas.criarNovoProjeto();
    int opcao = controladorJanelas.obterServicos().exibirMensagemEscolhaSimNaoCancelar("Encerrar Aplicativo?");
    if (opcao == 0) {
        if (controladorJanelas.isProjetoCriado()) {
            int opcao2 = controladorJanelas.obterServicos().exibirMensagemEscolhaSimNao("Deseja Salvar Projeto?");
            if (opcao2 == 0) {
                controladorJanelas.obterServicos().salvarProjeto();
                controladorJanelas.obterServicos().exibirMensagemInformacao("Projeto Salvo com Sucesso");
            } else if (opcao2 == 1) {
            }
        }        
        System.exit(0);
    }


}//GEN-LAST:event_jMenuItemSairActionPerformed

/*
private void jMenuItemSobreActionPerformed(java.awt.event.ActionEvent evt) {

   controladorJanelas.abrirJanelaSobre();
}*/
private void jMenuItemAbrirProjetoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAbrirProjetoActionPerformed

    controladorJanelas.abrirNovoProjeto();
}//GEN-LAST:event_jMenuItemAbrirProjetoActionPerformed

private void jMenuItemEditarMaterialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditarMaterialActionPerformed
// TODO add your handling code here:
    controladorJanelas.abrirJanelaEditarMaterial();
}//GEN-LAST:event_jMenuItemEditarMaterialActionPerformed

private void jMenuItemCadastrarMaterialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCadastrarMaterialActionPerformed
// TODO add your handling code here:
    controladorJanelas.abrirJanelaCadastrarMaterial();
}//GEN-LAST:event_jMenuItemCadastrarMaterialActionPerformed

private void jMenuItemImportarSTLActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemImportarSTLActionPerformed
// TODO add your handling code here:
    controladorJanelas.importarSTL();
}//GEN-LAST:event_jMenuItemImportarSTLActionPerformed

private void jMenuItemGerarMalhaFDTDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemGerarMalhaFDTDActionPerformed
// TODO add your handling code here:
    controladorJanelas.obterServicos().configurarSimulacaoFDTD();
//controladorJanelas.obterServicos().gerarMalhaFDTD(null);  
}//GEN-LAST:event_jMenuItemGerarMalhaFDTDActionPerformed

private void jMenuItemCriarFonteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCriarFonteActionPerformed
// TODO add your handling code here:
    JanelaCriarFonteEletromagnetica janelaFonte;
    try {
        janelaFonte = new JanelaCriarFonteEletromagnetica(new javax.swing.JFrame(), true);
        janelaFonte.setVisible(true);
    } catch (Exception e) {
        e.printStackTrace();
    }
}//GEN-LAST:event_jMenuItemCriarFonteActionPerformed

private void jMenuItemEditarFonteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemEditarFonteActionPerformed
// TODO add your handling code here:
    JanelaEditarFonteEletromagnetica janelaEditarFonte;
    try {
        janelaEditarFonte = new JanelaEditarFonteEletromagnetica(new javax.swing.JFrame(), true);
        janelaEditarFonte.setVisible(true);
    } catch (Exception e) {
        e.printStackTrace();
    }
}//GEN-LAST:event_jMenuItemEditarFonteActionPerformed

private void jMenuItemSalvarProjetoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSalvarProjetoActionPerformed
// TODO add your handling code here:
    controladorJanelas.salvarProjeto();
    controladorJanelas.obterServicos().exibirMensagemInformacao("Projeto Salvo com Sucesso");
}//GEN-LAST:event_jMenuItemSalvarProjetoActionPerformed

private void jMenuItemRemoverFonteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemRemoverFonteActionPerformed
        try {
            controladorJanelas.janelaRemoverFonteEletromagnetica();

        } catch (IOException ex) {
            Logger.getLogger(JanelaPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_jMenuItemRemoverFonteActionPerformed

private void jMenuItemImportarMalhaFDTDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemImportarMalhaFDTDActionPerformed
// TODO add your handling code here:
    controladorJanelas.obterServicos().importarMalha();
}//GEN-LAST:event_jMenuItemImportarMalhaFDTDActionPerformed


private void jMenuItemAjudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAjudaActionPerformed
   // TODO add your handling code here:
   // controladorJanelas.abrirJanelaAjuda();
       try {
           Runtime.getRuntime().exec("winhlp32.exe " + "\\WinHelp\\SEM-BR11.hlp");
           // Runtime.getRuntime().exec("winhlp32.exe " + "C:\\Documents and Settings\\daniella\\Desktop\\SoftwareSAR_Funcionando7\\WinHelp\\SEM-BR.hlp");
    }
    catch (IOException ex) {
            System.out.println(
                    "Tela de Ajuda " + ex.toString()
                    );
    }
}//GEN-LAST:event_jMenuItemAjudaActionPerformed
/*private void jMenuItemAjudaActionPerformed(java.awt.event.ActionEvent evt) {
   // TODO add your handling code here:
    try {
            Runtime.getRuntime().exec("winhlp32.exe " + "C:\\Documents and Settings\\daniella\\Desktop\\SoftwareSAR_Funcionando5\\WinHelp\\SEM-BR.hlp");
    }
    catch (IOException ex) {
            System.out.println(
                    "Tela de Ajuda " + ex.toString()
                    );
    }
}  */
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
    // TODO add your handling code here:
    controladorJanelas.abrirJanelaSobre();
}//GEN-LAST:event_jMenuItem1ActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenuAjuda;
    private javax.swing.JMenu jMenuArquivo;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu jMenuEditar;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenuItem jMenuItemAbrirProjeto;
    private javax.swing.JMenuItem jMenuItemCadastrarMaterial;
    private javax.swing.JMenuItem jMenuItemCriarFonte;
    private javax.swing.JMenuItem jMenuItemEditarFonte;
    private javax.swing.JMenuItem jMenuItemEditarMaterial;
    private javax.swing.JMenuItem jMenuItemGerarMalhaFDTD;
    private javax.swing.JMenuItem jMenuItemImportarDXF;
    private javax.swing.JMenuItem jMenuItemImportarMalhaFDTD;
    private javax.swing.JMenuItem jMenuItemImportarSSAR;
    private javax.swing.JMenuItem jMenuItemImportarSTL;
    private javax.swing.JMenuItem jMenuItemNovoProjeto;
    private javax.swing.JMenuItem jMenuItemRemoverFonte;
    private javax.swing.JMenuItem jMenuItemSair;
    private javax.swing.JMenuItem jMenuItemSalvarProjeto;
    private javax.swing.JMenuItem jMenuItemSimularFDTD;
    private javax.swing.JMenu jMenuSimulacao;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    // End of variables declaration//GEN-END:variables
    private GerenciamentoArvore gerenciadorArvore;
    private JTree tree;
    private DefaultTreeModel model;
}

